package com.feng.study.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class GlobalExceptionDemo {

    @GetMapping("/demo/globalExceptionDemo")
    public void globalExceptionDemo(){
        int a =11/0;
        int[] nums=new int[1];
        nums[0]=1;
        nums[1]=2;
        System.out.println("测试全局异常捕获");
    }
}
